package edu.sctu.wulixia.month4and5.day20150527;

/**
 * Created by user05 on 2015/5/27.
 */
//设置学生的基本信息

public class Student {
    private String name;
    private int campuscard;
    public Student(String name, int campuscard) {
        this.name = name;
        this.campuscard = campuscard;

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCampuscard() {
        return campuscard;
    }

    public void setCampuscard(int campuscard) {
        this.campuscard = campuscard;
    }

    public void isSelectDish(){
        Window window = new Window();
        System.out.println("你选择了" + window.isWindowMessage()[1].getNumber()+"的"+
                window.isWindowMessage()[1].getDishes()[1].getDish_name()+
                "   价格为"+ window.isWindowMessage()[1].getDishes()[1].getDish_price()+"元");
    }

    Rice rice = new Rice();
    public void isSelectRice(int i){

        if(i == 1) {
            rice.isRicePrice(1);
            System.out.println("你要米饭，价格为：" + rice.getRiceprice() + "元");
        }
            if(i == 0){
                rice.isRicePrice(0);
                System.out.println("你不需要米饭");
            }
    }

    public void isPayBill(){
        Window window1 = new Window();
        CampusCard card = new CampusCard();
        int total ;
        int balance;
        total =  window1.isWindowMessage()[1].getDishes()[1].getDish_price() + rice.getRiceprice();
        System.out.println("你应该支付："+ total+"元");
        balance = card.balance - total;
        System.out.println("你的饭卡之前的余额为" + card.balance + "元");
        System.out.println("目前余额为："+ balance + "元");
    }

    public void isSelectSeat(int number){
        if(number%2 == 1){
            System.out.println("欢迎就坐" + number +"号");
        }
        if(number%2 == 0){
            System.out.println("很抱歉，"+ number+"号座位已经被占");
        }
    }
}


